HTML Tables |
您所在的位置:网站首页 › table text翻译 › HTML Tables |
HTML Tables
❮ Previous
Next ❯
HTML tables allow web developers to arrange data into rows and columns. Example Company Contact Country Alfreds Futterkiste Maria Anders Germany Centro comercial Moctezuma Francisco Chang Mexico Ernst Handel Roland Mendel Austria Island Trading Helen Bennett UK Laughing Bacchus Winecellars Yoshi Tannamuri Canada Magazzini Alimentari Riuniti Giovanni Rovelli Italy Try it Yourself » Define an HTML TableA table in HTML consists of table cells inside rows and columns. ExampleA simple HTML table: Company Contact Country Alfreds Futterkiste Maria Anders Germany Centro comercial Moctezuma Francisco Chang Mexico Try it Yourself » Table CellsEach table cell is defined by a and a tag. td stands for table data. Everything between and are the content of the table cell. Example Emil Tobias Linus Try it Yourself »Note: A table cell can contain all sorts of HTML elements: text, images, lists, links, other tables, etc. Table RowsEach table row starts with a and ends with a tag. tr stands for table row. Example Emil Tobias Linus 16 14 10 Try it Yourself »You can have as many rows as you like in a table; just make sure that the number of cells are the same in each row. Note: There are times when a row can have less or more cells than another. You will learn about that in a later chapter. Table HeadersSometimes you want your cells to be table header cells. In those cases use the tag instead of the tag: th stands for table header. ExampleLet the first row be table header cells: Person 1 Person 2 Person 3 Emil Tobias Linus 16 14 10 Try it Yourself »By default, the text in elements are bold and centered, but you can change that with CSS. HTML Exercises HTML Table Tags Tag Description Defines a table Defines a header cell in a table Defines a row in a table Defines a cell in a table Defines a table caption Specifies a group of one or more columns in a table for formatting Specifies column properties for each column within a element Groups the header content in a table Groups the body content in a table Groups the footer content in a tableFor a complete list of all available HTML tags, visit our HTML Tag Reference. Video: HTML Tables ❮ Previous Next ❯ LEARN MOREStyling Tables Filter Table Sort Table Responsive Table Zebra Striped Table ★ +1 W3schools Pathfinder Track your progress - it's free! Log in Sign Up |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |